package 函数式编程;

import java.util.Arrays;
import java.util.function.BiFunction;
import java.util.function.Function;

public class 函数式编程 {
    public static void 外函数(Function<String, Integer> f, String s) {
        f.apply(s);
    }

//    public static void f(String s, Integer i) {
//        System.out.println(s);
//    }

    public static void main(String[] args) {
        Function<String, Integer> f = s -> s.length();
        BiFunction<Integer, Integer, Integer> biFunction = (a, b) -> a + b;
        biFunction.apply(1, 2);
    }
}
